package com.ggy.tuibi.Schedu;

import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;

import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author guoguangyuan
 * @Date 2025/5/1
 */
public class JingXiChapWan {
    public static void main(String[] args) {
        JingXiChapWan service = new JingXiChapWan();
        ExecutorService executorService = Executors.newCachedThreadPool();
        List<Runnable> taskList = new ArrayList<>();
        for (int i = 0; i < 500; i++) {
            taskList.add(() -> service.xiaji());
        }
        for (Runnable runnable : taskList) {
            executorService.submit(runnable);
        }

        executorService.shutdown();
    }

    private void xiaji(){
        Map<String,String> headers = new HashMap<>();
        headers.put("Authorization","Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJEYXRhIjp7Ik1lbWJlcklkIjo1NDA5MCwiQ3JlYXRlZEF0IjoxNzQ2MDQ1MzU0fSwiZXhwIjoxNzc3NDk3NTE0LCJpYXQiOjE3NDYwNDc5MTR9.CWOA89Y5B_Us47LVl7oSIz8mdPPyr4vkYGY5cbmhIbE");
        headers.put("Client-Imei","d0d4add351c740cdb2ed0925376620ef");
        headers.put("Client-Imsi","d0d4add351c740cdb2ed0925376620ef");
        headers.put("User-Agent","Mozilla/5.0 (Linux; Android 9; V1824A Build/PQ3A.190705.09211555; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36 Html5Plus/1.0");
        headers.put("Source-Id","app");
        headers.put("Channel-Id","8");
        headers.put("App-version","1.0.1");

//        Map<String,Object> bodyMap=new HashMap<>();
//        bodyMap.put("mcCode","51ff6f064975555011431887");
//        bodyMap.put("p","1");
//        bodyMap.put("gameUid", "61f28715-6f4b-46bb-b752-4c118ecf9ca5");

        HttpResponse response = HttpUtil.createPost("http://cloudgame.jxcwyjj.com/cloudGame/api/v1/game/fwjt_cjk/device/outTicket")
                .addHeaders(headers)
                .body("{\"mcCode\":\"51ff6f064975555011431887\",\"p\":1,\"gameUid\":\"afe60084-74ec-4b62-b5da-fb82aae94bdd\"}").execute();
        System.out.println(response.body());

    }


    private void qiandao(){
        Map<String,String> headers = new HashMap<>();
        headers.put("Authorization","Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJEYXRhIjp7Ik1lbWJlcklkIjo1NDA5MCwiQ3JlYXRlZEF0IjoxNzQ2MDQ1MzU0fSwiZXhwIjoxNzc3NDk0OTU0LCJpYXQiOjE3NDYwNDUzNTR9.WetrV18JGVNrG8Tj1OqOJTBnZfxRyI_e0nuds0xusJg");
        headers.put("Client-Imei","d0d4add351c740cdb2ed0925376620ef");
        headers.put("Client-Imsi","d0d4add351c740cdb2ed0925376620ef");
        headers.put("User-Agent","Mozilla/5.0 (Linux; Android 9; V1824A Build/PQ3A.190705.09211555; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36 Html5Plus/1.0");
        headers.put("Source-Id","app");
        headers.put("Channel-Id","8");
        headers.put("App-version","1.0.1");

        HttpResponse response = HttpUtil.createGet("http://cloudgame.jxcwyjj.com/cloudGame/api/v1/member/sign").addHeaders(headers).execute();
        System.out.println(response.body());
    }

    private void renwulingqu(){
        Map<String,String> headers = new HashMap<>();
        headers.put("Authorization","Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJEYXRhIjp7Ik1lbWJlcklkIjo1NDA5MCwiQ3JlYXRlZEF0IjoxNzQ2MDQ1MzU0fSwiZXhwIjoxNzc3NDk0OTU0LCJpYXQiOjE3NDYwNDUzNTR9.WetrV18JGVNrG8Tj1OqOJTBnZfxRyI_e0nuds0xusJg");
        headers.put("Client-Imei","d0d4add351c740cdb2ed0925376620ef");
        headers.put("Client-Imsi","d0d4add351c740cdb2ed0925376620ef");
        headers.put("User-Agent","Mozilla/5.0 (Linux; Android 9; V1824A Build/PQ3A.190705.09211555; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36 Html5Plus/1.0");
        headers.put("Source-Id","app");
        headers.put("Channel-Id","8");
        headers.put("App-version","1.0.1");
        HttpResponse response = HttpUtil.createGet("http://cloudgame.jxcwyjj.com/cloudGame/api/v1/member/taskDailyCheck/v2?taskDailyId=1")
                .addHeaders(headers).execute();
        System.out.println(response.body());
    }

    private void duihuan(){
        Map<String,String> headers = new HashMap<>();
        headers.put("Authorization","Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJEYXRhIjp7Ik1lbWJlcklkIjo1NDA5MCwiQ3JlYXRlZEF0IjoxNzQ2MDQ1MzU0fSwiZXhwIjoxNzc3NDk0OTU0LCJpYXQiOjE3NDYwNDUzNTR9.WetrV18JGVNrG8Tj1OqOJTBnZfxRyI_e0nuds0xusJg");
        headers.put("Client-Imei","d0d4add351c740cdb2ed0925376620ef");
        headers.put("Client-Imsi","d0d4add351c740cdb2ed0925376620ef");
        headers.put("User-Agent","Mozilla/5.0 (Linux; Android 9; V1824A Build/PQ3A.190705.09211555; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36 Html5Plus/1.0");
        headers.put("Source-Id","app");
        headers.put("Channel-Id","8");
        headers.put("App-version","1.0.1");

        Map<String,Object> body = new HashMap<>();
        body.put("code","1743600305");
        HttpResponse response = HttpUtil.createPost("http://cloudgame.jxcwyjj.com/cloudGame/api/v1/redeemCode/receive").addHeaders(headers).body(JSONUtil.toJsonStr(body)).execute();
        System.out.println(response.body());
    }

}
